/**
 *  Copyright (C) 2014-2015 The MeiRiQ All Right Reserve.
 */
package com.example.bannerdemo.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Banner 实体类
 * 
 * @version 1.0
 * @time 2015-6-8 下午8:46:57
 * @author zhangchaoxian@meiriq.com
 */
public class Banner implements Parcelable {

	// banner唯一标识id
	String id;
	// banner名
	String name;
	// 标题
	String title;
	// 链接地址
	String url;
	// 图片地址
	String img;
	// 描述
	String desc;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(name);
		dest.writeString(title);
		dest.writeString(url);
		dest.writeString(img);
		dest.writeString(desc);
	}

	public static final Parcelable.Creator<Banner> CREATOR = new Parcelable.Creator<Banner>() {

		@Override
		public Banner createFromParcel(Parcel source) {
			Banner banner = new Banner();
			banner.id = source.readString();
			banner.name = source.readString();
			banner.title = source.readString();
			banner.url = source.readString();
			banner.img = source.readString();
			banner.desc = source.readString();
			return banner;
		}

		@Override
		public Banner[] newArray(int size) {
			return new Banner[size];
		}
	};

	@Override
	public String toString() {
		return "Banner [id=" + id + ", name=" + name + ", title=" + title
				+ ", url=" + url + ", img=" + img + ", desc=" + desc + "]";
	}

}
